package com.spic.business.train.questions.domain;

import com.spic.common.core.annotation.Excel;
import com.spic.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 题库管理对象 train_questions
 *
 * @author renxiang
 * @date 2021-10-20
 */
public class TrainQuestions extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 题目ID */
    private String id;

    /** 题目内容 */
    private String questionsContent;

    /** 科目类型 （数据字典 course_type） */
    @Excel(name = "科目类型 ", readConverterExp = "数=据字典,c=ourse_type")
    private String courseType;

    /** 题目类型 （数据字典 questions_type ） 1：单选题 2：多选题  3：判断题  4：填空题 */
    @Excel(name = "题目类型 ", readConverterExp = "数=据字典,q=uestions_type")
    private String questionsType;

    /** 题目难度（数据字典 questions_difficulty） */
    @Excel(name = "题目难度", readConverterExp = "数=据字典,q=uestions_difficulty")
    private String questionsDifficulty;

    /** 参考答案(答案项 id 多项使用, 隔开) */
    private String answerSingle;

    private Double fraction;//每题分数
    //是否有效 0有效 1 无效
    private String state;

    public String getState()
    {
        return state;
    }

    public void setState(String state)
    {
        this.state = state;
    }

    public Double getFraction()
    {
        return fraction;
    }

    public void setFraction(Double fraction)
    {
        this.fraction = fraction;
    }

    private  List<String>  dualChooseArr = new ArrayList<>();

    public List<String> getDualChooseArr()
    {
        return dualChooseArr;
    }

    public void setDualChooseArr(List<String> dualChooseArr)
    {
        this.dualChooseArr = dualChooseArr;
    }

    /** 试题答案项  判断题选项共用，题库ID为000 A 为 对，B为错信息 */
    private List<TrainQuestionsOptions> trainQuestionsOptionsList;

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setQuestionsContent(String questionsContent)
    {
        this.questionsContent = questionsContent;
    }

    public String getQuestionsContent()
    {
        return questionsContent;
    }
    public void setCourseType(String courseType)
    {
        this.courseType = courseType;
    }

    public String getCourseType()
    {
        return courseType;
    }
    public void setQuestionsType(String questionsType)
    {
        this.questionsType = questionsType;
    }

    public String getQuestionsType()
    {
        return questionsType;
    }
    public void setQuestionsDifficulty(String questionsDifficulty)
    {
        this.questionsDifficulty = questionsDifficulty;
    }

    public String getQuestionsDifficulty()
    {
        return questionsDifficulty;
    }
    public void setAnswerSingle(String answerSingle)
    {
        this.answerSingle = answerSingle;
    }

    public String getAnswerSingle()
    {
        return answerSingle;
    }

    public List<TrainQuestionsOptions> getTrainQuestionsOptionsList()
    {
        return trainQuestionsOptionsList;
    }

    public void setTrainQuestionsOptionsList(List<TrainQuestionsOptions> trainQuestionsOptionsList)
    {
        this.trainQuestionsOptionsList = trainQuestionsOptionsList;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("questionsContent", getQuestionsContent())
            .append("courseType", getCourseType())
            .append("questionsType", getQuestionsType())
            .append("questionsDifficulty", getQuestionsDifficulty())
            .append("answerSingle", getAnswerSingle())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("trainQuestionsOptionsList", getTrainQuestionsOptionsList())
            .toString();
    }
}
